/*
 * Copyright 2020-2025 the original author or authors.
 * You cannot use this file unless authorized by the author.
 */

package org.ipig.model;

import org.ipig.constants.DataCnst;
import org.ipig.constants.SymbolCnst;
import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * CacheConf
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @version $$Id: CacheConf.java 3 2020-01-21 09:36:33Z ts <comchnts@163.com> $$
 * @since 1.0
 */
@Data
public class CacheConf implements Serializable {
    //类型 SKELETON_MODEL_ANLS 与 SKELETON_MODEL_PROC
    private String type;
    //唯一编码
    private String code;
    //功能说明
    private String title;
    //【对外暴露】key映射字段，多个以逗号隔开【与keyFields一一对应映射】，有序
    private String keyMapingFields;
    //key字段，多个以逗号隔开，有序
    private String keyFields;
    //值字段，多个以逗号隔开，有序
    private String valueFields;
    //【对外暴露】值映射字段，多个以逗号隔开【与valueFields一一对应映射】，有序
    private String valueMapingFields;
    //key字段分隔符,当key字段存在多个时使用,默认为井号
    private String keySeparator = SymbolCnst.WELL;
    //value字段分隔符,当value字段存在多个时使用,默认为井号
    private String valueSeparator = SymbolCnst.WELL;
    //查询语句
    private String queryLanguage;
    //过期时限,为数字单位为Second
    private int expiration;
    /**
     * 连接器Conf
     **/
    private ConnectorConf connectorConf;
    private String inputConnCode;
    /**
     * 输出器Conf
     **/
    private ConnectorConf outputterConf;
    private String outputConnCode;
    // 其它属性
    private Map<String, String> props = new HashMap<String, String>();
    //逻辑删除标识
    private String deletedFlag= DataCnst.FLAG_NORMAL;
    /**
     * 调试输出标识 默认关闭
     */
    private Boolean debugEnable = Boolean.valueOf(false);
    //数据缓存模式，目前支持DataCnst.OutputPattern ，默认DataCnst.OutputPattern.KV_SINGLE.code。
    private String pattern=DataCnst.OutputPattern.KV_SINGLE.code;
}